
Page({
	data: {
		show:false,
		list:[
			{name:'陕西中海人力资源开发有限公司(陕人研优聘)',appid:'',status:0},
			{name:'优职优工',appid:'',status:0},
		],
		status:['开发中','审核中','审核通过'],
		name:'',
		appid:'',
		popUpShow:false,
		authLink:'授权链接',
	},
	onLoad: function (options) {
		console.log('onLoad');
	},
	onShow: function () {
		console.log('onShow');
	},
	getAuthLink(){
		wx.request({
			url:'http://appv4.chinalao.com/api/authorizerAccessToken',
			method:'post',
			success:(res)=>{
				this.setData({
					popUpShow:true
				});
			}
		});
	},
	copyAuthLink(){
		this.setData({
			popUpShow:!this.data.popUpShow
		})
	},
	getNameInput(e){
		this.setData({
			name:e.value
		})
	},
	getAppidInput(e){
		this.setData({
			appid:e.value
		})
	},
	openAdd(){
		this.setData({
			name:'',
			appid:'',
			show:!this.data.show,
		})
	},
	add: function () {
		let list=this.data.list
		list.push({name:this.data.name,appid:this.data.appid,status:0})
		this.setData({
			list:list
		})
		this.openAdd();
	},
	openDetail(e){
		console.log(e)
		wx.navigateTo({
  			url: '/pages/detail/index',
  		});
	}

});
